<include file="Public:head" />
<style>
    tr td{
        text-align: center;
    }
    .dannum{
        width: 250px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        display: inline-block;
    }
    .dannum1{
         width: 150px;
         overflow: hidden;
         white-space: nowrap;
         text-overflow: ellipsis;
         display: inline-block;
     }
</style>
<body class="overflow-hidden">
<div class="wrapper preload">
    <include file="Public:header" />
    <include file="Public:left" />

    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                        菜单管理
                    </div>
                </div>
            </div>
            <div class="col-sm-12 row chach">
                <a href="{:U('Menus/menu_add',array('module'=>I('get.menu_name',0),'pid'=>I('get.pid',0)))}"  class="action-button ">新增</a>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <div class="smart-widget-header row ">
                            <span class="smart-widget-option">
                                <span class="refresh-icon-animated">
                                    <i class="fa fa-spinner fa-spin" style="color:#fff"></i>
                                </span>
                                <a href="#" class="widget-toggle-hidden-option">
                                </a>
                                <a href="#" class="widget-collapse-option" data-toggle="collapse">
                                </a>
                                <a href="#" class="widget-refresh-option">
                                </a>
                            </span>
                        </div>
                        <div class="smart-widget-inner table-responsive">
                            <div class="smart-widget-hidden-section">
                                <ul class="widget-color-list clearfix">
                                    <li style="background-color:#20232b;" data-color="widget-dark"></li>
                                    <li style="background-color:#4c5f70;" data-color="widget-dark-blue"></li>
                                    <li style="background-color:#23b7e5;" data-color="widget-blue"></li>
                                    <li style="background-color:#1fb5ac;" data-color="widget-green"></li>
                                    <li style="background-color:#edbc6c;" data-color="widget-yellow"></li>
                                    <li style="background-color:#fbc852;" data-color="widget-orange"></li>
                                    <li style="background-color:#e36159;" data-color="widget-red"></li>
                                    <li style="background-color:#7266ba;" data-color="widget-purple"></li>
                                    <li style="background-color:#f5f5f5;" data-color="widget-light-grey"></li>
                                    <li style="background-color:#fff;" data-color="reset"></li>
                                </ul>
                            </div>
                            <table class="table table-striped no-margin">
                                <thead>
                                <tr>
                                    <th class="text-center" style="width: 80px">序号</th>
                                    <th class="text-center " style="width: 200px">名称</th>
                                    <th class="text-center " style="width: 200px">上级菜单</th>
                                    <th class="text-center " style="width: 200px">分组</th>
                                    <th class="text-center " >URL</th>
                                    <th class="text-center " style="width: 200px">排序</th>
                                    <th class="text-center " style="width:300px">仅开发者模式显示</th>
                                    <th class="text-center " style="width: 200px">隐藏</th>
                                    <th class="text-center" style="width: 300px">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <notempty name="list">
                                    <volist name="list" id="menu" key="k">
                                        <tr>
                                            <td style="text-align: center">{$k}</td>
                                            <td style="text-align: center">
                                                <span class="dannum1"><a href="{:U('edit?pid='.$menu['id'].'&menu_name='.$menu['module'])}">{$menu.title}</a></span>
                                            </td>
                                            <td style="text-align: center">{$menu.up_title|default='无'}</td>
                                            <td style="text-align: center">{$menu.group}</td>
                                            <td style="text-align: center"><span class="dannum">{$menu.url}</span></td>
                                            <td style="text-align: center">{$menu.sort}</td>
                                            <td style="text-align: center">
                                                <!--<a href="{:U('toogleDev',array('id'=>$menu['id'],'value'=>abs($menu['is_dev']-1)))}" class="ajax-get">-->
                                                    {$menu.is_dev_text}
                                                <!--</a>-->
                                            </td>
                                            <td style="text-align: center">
                                                <!--<a href="{:U('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}" class="ajax-get">-->
                                                    {$menu.hide_text}
                                                <!--</a>-->
                                            </td>
                                            <td style="text-align: center">
                                                <a title="编辑" href="{:U('menu_edit?id='.$menu['id'])}">编辑</a>
                                                <a class="confirm ajax-get"  title="删除" href="{:U('del?id='.$menu['id'].'&menu_id='.$menu['menu_id'])}">删除</a>
                                            </td>
                                        </tr>
                                    </volist>
                                    <else/>
                                    <td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td>
                                </notempty>
                                </tbody>
                            </table>
                        </div><!-- ./smart-widget-inner -->
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
    <include file="Public:foot" />
</div><!-- /wrapper -->
<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>
</body>
</html>
<block name="script">
    <script>
        $(function(){
            highlight_nav2('{:U("Menus/menuList")}');
        })


    </script>
</block>
